import request from '@/utils/request'

// 新增供应商
export function insertSupplierDetail(data) {
  return request({
    url: '/tBdSupplier/insertSupplierDetail',
    method: 'post',
    data
  })
}
// 供应商更新接口
export function updateSuplierDetail(data) {
  return request({
    url: '/tBdSupplier/updateSuplierDetail',
    method: 'put',
    data
  })
}
// 供应商详情接口
export function querySupplierDetail(params) {
  return request({
    url: '/tBdSupplier/querySupplierDetail',
    method: 'get',
    params
  })
}
// 查询供应商分组
export function querySupplierGroup(params) {
  return request({
    url: '/tBdSupplier/querySupplierGroup',
    method: 'get',
    params
  })
}
// 国家列表
export function queryFcountryListOld(data) {
  return request({
    url: '/tBasAssistantdataentry/queryFcountryListOld',
    method: 'post',
    data
  })
}
// 地区列表
export function queryFprovinceListOld(data) {
  return request({
    url: '/tBasAssistantdataentry/queryFprovinceListOld',
    method: 'post',
    data
  })
}
// 查询供应商清单
export function querySupplierList(data) {
  return request({
    url: '/tBdSupplier/querySupplierList',
    method: 'post',
    data
  })
}
// 查询未处理供应商列表
export function queryUntreatedSupplierList(data) {
  return request({
    url: '/tBdSupplier/queryUntreatedSupplierList',
    method: 'post',
    data
  })
}
// 查询审核中供应商列表
export function queryReviewSupplierList(data) {
  return request({
    url: '/tBdSupplier/queryReviewSupplierList',
    method: 'post',
    data
  })
}
// 查询未通过供应商列表
export function queryFailSupplierList(data) {
  return request({
    url: '/tBdSupplier/queryFailSupplierList',
    method: 'post',
    data
  })
}
// 实行供应商维护使用 - 审核供应商
export function reviewSupplierOnce(data) {
  return request({
    url: '/tBdSupplier/reviewSupplierOnce',
    method: 'post',
    data
  })
}
// 查询审核人和审核时间
export function querySupplierOperator(params) {
  return request({
    url: '/tBdSupplier/querySupplierOperator',
    method: 'get',
    params
  })
}
// 查询操作记录
export function querySupplierLog(data) {
  return request({
    url: '/TJxLog/querySupplierLog',
    method: 'post',
    data
  })
}
// 审核供应商
export function supplierAudit(data) {
  return request({
    url: '/tBdSupplier/supplierAudit',
    method: 'put',
    data
  })
}
// 审核不通过供应商
export function supplierUnAudit(data) {
  return request({
    url: '/tBdSupplier/supplierUnAudit',
    method: 'put',
    data
  })
}
// 提交供应商
export function supplierSubmit(data) {
  return request({
    url: '/tBdSupplier/supplierSubmit',
    method: 'put',
    data
  })
}
// 反提交供应商
export function supplierAuSubmit(data) {
  return request({
    url: '/tBdSupplier/supplierAuSubmit',
    method: 'put',
    data
  })
}
// 提交供应商
export function disableSupplier(data) {
  return request({
    url: '/tBdSupplier/disableSupplier',
    method: 'put',
    data
  })
}
// 反提交供应商
export function undisableSupplier(data) {
  return request({
    url: '/tBdSupplier/undisableSupplier',
    method: 'put',
    data
  })
}
// 删除供应商
export function deleteSupplier(data) {
  return request({
    url: '/tBdSupplier/deleteSupplier',
    method: 'put',
    data
  })
}
